package com.mdd.admin.validate.reply;

import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 微信公众号自动回复参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class OfficialAccountReplyParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @NotNull(message = "name参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "name参数不能超出64个字符", groups = {create.class, update.class})
    private String name;

    @NotNull(message = "keyword参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "keyword参数不能超出64个字符", groups = {create.class, update.class})
    private String keyword;

    @NotNull(message = "replyType参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "replyType参数值不能少于0", groups = {create.class, update.class})
    private Integer replyType;

    @NotNull(message = "matchingType参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "matchingType参数值不能少于0", groups = {create.class, update.class})
    private Integer matchingType;

    @NotNull(message = "contentType参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "contentType参数值不能少于0", groups = {create.class, update.class})
    private Integer contentType;

    private String content;

    @NotNull(message = "status参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "status参数值不能少于0", groups = {create.class, update.class})
    private Integer status;

    @NotNull(message = "sort参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "sort参数值不能少于0", groups = {create.class, update.class})
    private Long sort;

}
